package leetcode.D200.T200;

import util.GraphUtil;

/**
 * @File Info: leetcode -- <M200>
 * @Author: 18362
 * @Create: 2022-02-26 12:07:50 星期六
 */
public class M200 {
    public static void main(String[] args) {
//        char[][] grid = GraphUtil.parseGraphChar("[[\"1\",\"1\",\"1\",\"1\",\"0\"],[\"1\",\"1\",\"0\",\"1\",\"0\"]," +
//                "[\"1\",\"1\",\"0\",\"0\",\"0\"],[\"0\",\"0\",\"0\",\"0\",\"0\"]]");
        char[][] grid = GraphUtil.parseGraphChar("[[\"1\",\"1\",\"0\",\"0\",\"0\"],[\"1\",\"1\",\"0\",\"0\",\"0\"]," +
                "[\"0\",\"0\",\"1\",\"0\",\"0\"],[\"0\",\"0\",\"0\",\"1\",\"1\"]]");
        GraphUtil.printGraph(grid);
        System.out.println(new Solution().numIslands(grid));
    }
}
